<template>
	<view class="mvs-list-wraper">
		<ul class="mvs-group">
			<li class="mv-item" v-for="(item,index) in mvListData.mvs" :key="index" @click="toMvDetails(item)">
				<image class="mv-cover" :src="item.imgurl" mode="widthFix"></image>
				<p class="mv-name">{{item.name}}</p>
			</li>
		</ul>
	</view>
</template>

<script>
	export default {
		data() {
			return {

			};
		},
		props: {
			mvListData: {
				type: Object,
				default () {
					return {}
				}
			}
		},
		methods:{
			toMvDetails(item){
				console.log(item)
				uni.navigateTo({
					url:`/pages/MvPlayer/MvPlayer?mvid=${item.id}`
				})
			}
		},
	}
</script>

<style lang="scss">
.mvs-list-wraper{
	.mvs-group{
		display: flex;
		flex-wrap: wrap;
		justify-content: left;
		list-style: none;
		.mv-item{
			width: 50%;
			border: .4rem solid #fdfaff;
			box-sizing: border-box;
			.mv-cover{
				width: 100%;
				border-radius: 2rem;
				box-shadow: 0px 0px 8px #000000;
			}
			.mv-name{
				font-size: .6rem;
			}
		}
		.mv-name{
			font-size: .6rem;
			text-overflow: -o-ellipsis-lastline;
			overflow: hidden;
			text-overflow: ellipsis;
			display: -webkit-box;
			-webkit-line-clamp: 2;
			line-clamp: 2;
			-webkit-box-orient: vertical;
		}
	}
}
</style>
